package com.drcoffee.drcoffeemall.feign;

import com.drcoffee.drcoffeemall.entry.erp.ErpImg;
import com.drcoffee.drcoffeemall.entry.erp.ErpOCC;
import com.github.pagehelper.PageInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

//@FeignClient(name = "provider-service", url = "http://localhost:8888")
@FeignClient(name = "provider-service", url = "http://localhost:8889")
public interface ErpProviderClient {

    @PostMapping("/erp/getErpCode")
    List<String> getErpCode(List<String> search);

    @PostMapping("/erp/getErpInventory")
    PageInfo<Map<String, Object>> getErpInventory(Map<String, Object> paramMap);


    @PostMapping("/erp/getErpParts")
    PageInfo<Map<String, Object>> getErpParts(Map<String, Object> paramMap);

    @PostMapping("/erp/getOrderErpCode")
    List<Map<String, Object>> getOrderErpCode(Map<String, Object> paramMap);

    @GetMapping("/erp/getCode")
    ErpOCC getCode(@RequestParam("company")String company);

    @GetMapping("/erp/allMaterial")
    ArrayList<ErpImg> allMaterial();

    @PostMapping("/erp/different")
    ErpImg different(@RequestParam String item ,@RequestParam String item1);

}
